﻿// Study0625.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
// 第六章 数组和指针 字符串 getline

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string s1, s2;
    cout << "输入s1,s2,以空格分隔：";
    cin >> s1 >> s2;
    cout << "s1:" << s1 << " s2:" << s2 << endl;

    for (int i = 0; i < 2; ++i)
    {
        string city, state;
        getline(cin, city, ';');
        getline(cin, state);
        cout << "City:" << city << " State:" << state << endl;
    }

    return 0;
}


